package com.ghxxzx.daglcustom.business_form.domain;

import com.ghxxzx.daglcustom.utils.CreatedTools;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.GenericGenerator;
import org.tmsps.ne4spring.orm.model.DataModel;

import javax.persistence.*;

/**
 * .存储表单对应的值
 * 
 * @author 刘华
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "t_form_vals")
@org.tmsps.ne4spring.annotation.Table("t_form_vals")
public class FormValsPo extends DataModel {

	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	private String kid;
	// 表单套
	private String form_type_kid;
	// 表单套名称
	private String form_type_name;
	// 表单:知道同一类表单,有利于表单重置:statuz为 -100
	private String form_kid;

	private String assigner; //提交人
	private String acti_task_id;// act_ru_task.ID
	private String acti_proc_inst_id;// act_ru_task.PROC_INST_ID_
	private int sortz;// 如上,按照审批的过程, 流程实例,加排序

	// 表单json值: 快照
	@Lob
	@Column(name = "form_json", columnDefinition = "text")
	private String form_json;

	// 存储表单值json值:填写的表单值
	@Lob
	@Column(name = "form_vals_json", columnDefinition = "text")
	private String form_vals_json;

	// 表单类型:填写单 or 审批单 or 流转单
	private String type;
	// 如果是流转单, 承接的上个id; 比如: 请假单-->销假单
	private String refer_kid;
	
	// 表单状态: 0 正常 or -100 作废
	private int statuz;

	private int status;
	private long created = CreatedTools.getCreated();

}
